package scau.jump.securitytrace.util;

import java.util.Properties;

@Deprecated
public class ConfigInfo {
	
	public static ConfigInfo configInfo = null;
	public static String FILENAME = "ui-conf.properties";
	public static String title = null;
	public static String version = null;
	public static String copyright = null;
	public static String loginFrameTitle = null;
	public static String mainFrameTitle = null;
	

	public ConfigInfo() {
		initConfigInfo(FILENAME);
	}

	// 初始化配置信息
	public void initConfigInfo(String fileName) {
		Properties prop = PropertiesUtil.getProperties(fileName);
		title = prop.getProperty("system_title");
		version = prop.getProperty("system_version");
		copyright = prop.getProperty("system_copyright");
		loginFrameTitle = prop.getProperty("loginFrame_title");
		mainFrameTitle = prop.getProperty("mainFrame_title");
	}

	public static synchronized ConfigInfo getInstance() {
		if (configInfo == null) {
			configInfo = new ConfigInfo();
		}
		return configInfo;
	}

	public String getTitle() {
		return title;
	}

	public String getVersion() {
		return version;
	}

	public String getCopyright() {
		return copyright;
	}

	public String getLoginFrameTitle() {
		return loginFrameTitle;
	}

	public String getMainFrameTitle() {
		return mainFrameTitle;
	}
}
